﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace Shrestha.Trigraph
{
    public class WorkingSet: IComparable<WorkingSet>
    {
        private double maxDbLat, minDbLat, maxDbLng, minDbLng;
        public object eField {get; set;}

        public double MinDbLng
        {
            get { return minDbLng; }
            set { minDbLng = value; }
        }

        public double MaxDbLng
        {
            get { return maxDbLng; }
            set { maxDbLng = value; }
        }
        
        public double MinDbLat
        {
            get { return minDbLat; }
            set { minDbLat = value; }
        }

        public double MaxDbLat
        {
            get { return maxDbLat; }
            set { maxDbLat = value; }
        }
        private DateTime maxDbDate, minDbDate;

        public DateTime MinDbDate
        {
            get { return minDbDate; }
            set { minDbDate = value; }
        }

        public DateTime MaxDbDate
        {
            get { return maxDbDate; }
            set { maxDbDate = value; }
        }

        private int totalRows;

        public int TotalRows
        {
            get { return totalRows; }
            set { totalRows = value; }
        }

        private List<TriEvent> triEventList;

        public List<TriEvent> TriEventList
        {
            get { return triEventList; }
            set { triEventList = value; }
        }


        public void AddEvent(TriEvent te)
        {
            triEventList.Add(te);
        }

        public void AddEvent(double latitude, double longitude, DateTime date)
        {
            triEventList.Add(new TriEvent(latitude, longitude, date));
        }

        private bool showLocationLines = true;

        public bool ShowLocationLines
        {
            get { return showLocationLines; }
            set { showLocationLines = value; }
        }

        public int CompareTo(WorkingSet other)
        {
            if (other.minDbLat == this.minDbLat &&
                other.minDbLng == this.minDbLng &&
                other.maxDbLat == this.maxDbLat &&
                other.maxDbLng == this.maxDbLng &&
                other.minDbDate == this.minDbDate &&
                other.maxDbDate == this.maxDbDate)
                return 0;
            else return 1;
        }
    }
}
